﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace XDA_ROM_Hub.Forms
{
    public partial class Unlock_Bootloader : Form
    {
        public Unlock_Bootloader()
        {
            InitializeComponent();
        }

        private void button2_Click(object sender, EventArgs e)
        {
            DialogResult results = MessageBox.Show("ARE YOU SURE?", "WARNING!", MessageBoxButtons.YesNo, MessageBoxIcon.Warning);
            if (results == DialogResult.Yes)
            {
                Properties.Settings.Default.UNLOCKCODE = textBox1.Text;
                Tweaks tweaks = new Tweaks();
                tweaks.UNLCOK();
                this.Hide();
            }
            else { this.Hide(); }
        }

        private void button3_Click(object sender, EventArgs e)
        {
            this.Hide();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            bool EnableGuide = Properties.Settings.Default.EnableGuide;
            if (EnableGuide == true)
            {
                MessageBox.Show("Hint: You need this code.", "Guide", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
            System.Diagnostics.Process.Start("http://unlockbootloader.sonymobile.com/unlock/step1");
        }
    }
}
